<template>
	<view class="nothimg-class">
		<image class="impoty-icon" :style="imgStyle"
			:src="imgUrl" mode="">
		</image>
		<view class="empoty">
			<slot></slot>
		</view>
		<view @tap="toHome" class="fanhui" v-if="isIndex">
			回到首页
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			imgUrl:{
				type:String,
				default:''
			},
			isIndex:{
				type:Boolean,
				default:false
			},
			imgStyle:{
				type:String,
				default:''
			}
		},
		methods: {
			toHome(){
				uni.switchTab({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style>
	.nothimg-class {
		width: 750rpx;
	
		padding-top: 160rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;
	
	
	}
	.impoty-icon {
		display: block;
		width: 320rpx;
		height: 440rpx;
	}
	.fanhui {
		width: 240rpx;
		height: 78rpx;
		background: rgba(84, 117, 255, 0.1);
		border-radius: 12rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-weight: 600;
	
		font-size: 30rpx;
		color: #607fff;
		margin-top: 72rpx;
	
	}
</style>